/*
 * MembersGetListByGroup.java
 *
 * Created on November 13, 2008, 8:50 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package jollylengkono.skripsi.Members.action;

import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jollylengkono.skripsi.dao.MembersDao;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

/**
 *
 * @author JollkY
 */
public class MembersGetListByGroup extends Action {
    
    /** Creates a new instance of MembersGetListByGroup */
    public MembersGetListByGroup() {
    }
    
    public ActionForward execute(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response) {
        long id = Long.parseLong(request.getParameter("grp_id"));
        List members = new ArrayList();
        members = new MembersDao().getListByGroup(id);
        request.setAttribute("members", members);
        return mapping.findForward("success");
    }
    
}
